package com.schoolcardinfo.beans;

public class ExpenseInfo {
	private int eid;//消费ID
	private String etype;//消费类型
	private double emoney;//消费金额
	private String etime;//消费时间
	private int sid;//卡号
	
	@Override
	public String toString() {
		return "ExpenseInfo [eid=" + eid + ", etype=" + etype + ", emoney=" + emoney + ", etime=" + etime + ", sid="
				+ sid + "]";
	}

	public int getEid() {
		return eid;
	}

	public void setEid(int eid) {
		this.eid = eid;
	}

	public String getEtype() {
		return etype;
	}

	public void setEtype(String etype) {
		this.etype = etype;
	}

	public double getEmoney() {
		return emoney;
	}

	public void setEmoney(double emoney) {
		this.emoney = emoney;
	}

	public String getEtime() {
		return etime;
	}

	public void setEtime(String etime) {
		this.etime = etime;
	}

	public int getSid() {
		return sid;
	}

	public void setSid(int sid) {
		this.sid = sid;
	}

	public ExpenseInfo(int eid, String etype, double emoney, String etime, int sid) {
		super();
		this.eid = eid;
		this.etype = etype;
		this.emoney = emoney;
		this.etime = etime;
		this.sid = sid;
	}

	public ExpenseInfo() {
		super();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + eid;
		long temp;
		temp = Double.doubleToLongBits(emoney);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + ((etime == null) ? 0 : etime.hashCode());
		result = prime * result + ((etype == null) ? 0 : etype.hashCode());
		result = prime * result + sid;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ExpenseInfo other = (ExpenseInfo) obj;
		if (eid != other.eid)
			return false;
		if (Double.doubleToLongBits(emoney) != Double.doubleToLongBits(other.emoney))
			return false;
		if (etime == null) {
			if (other.etime != null)
				return false;
		} else if (!etime.equals(other.etime))
			return false;
		if (etype == null) {
			if (other.etype != null)
				return false;
		} else if (!etype.equals(other.etype))
			return false;
		if (sid != other.sid)
			return false;
		return true;
	}
}
